
import BasicLayout from "@/layout/BasicLayout.vue"
import type { RouteRecordRaw } from 'vue-router';
export const accessRoutes:RouteRecordRaw[] = [
    {
        path:'/app',
        name:'app',
        component:BasicLayout,
        redirect: '/app/home',
        meta: { title: '管理平台' },
        children:[
            {
                path: '/app/home',
                component:()=> import("../views/Home.vue"),
                name: 'home',
                meta: {
                    title: '首页',
                    auth: ['home'],
                },
            },
        ]
    },
    // {
    //     path:'/basic',
    //     component:BasicLayout,
    //     children:[
    //         {
    //             path:'/styles',
    //             component:()=> import("../views/Styles")
    //         }
    //     ]
    // }
]

const constantRoutes: RouteRecordRaw[] = [
    {
        path: '/login',
        component: () => import('../views/login/index.vue'),
        name: 'login',
        meta: { title: '登录' },
    },
    {
        path:'/',
        name: 'Root',
        redirect: '/app',
        meta: {
            title: 'Root',
        },
    },
    // ...accessRoutes
];

export const publicRoutes:RouteRecordRaw[] = [
    {
        path: '/404',
        component: () => import('@/views/404.vue'),
    }
]

export default constantRoutes;

